package be.artesis.titamo.io.dbinterface;

public final class PostgreSQLInterface implements SQLInterface
{

	public String getPKExtraOps() {
		return "NOT NULL";
	}

	public String getPKType() {
		return "serial";
	}

	public String getPKStatement() {
		return "CONSTRAINT \"PK_id\" PRIMARY KEY";
	}

	public String getStringType() {
		return "varchar";
	}

	public String getExtraCreationOptions() {
		return "WITH (OIDS=FALSE)";
	}

	public String getAlterTableQuery() {
		return "ALTER TABLE";
	}

	public String getDropTableQuery() {
		return "DROP TABLE IF EXISTS";
	}

	public String getEmptyTableQuery() {
		return "TRUNCATE TABLE";
	}

	public String getResetIndexQuery() {
		return "";
	}

	public String getEmptyTableOps() {
		return  "RESTART IDENTITY";
	}

	public String escapeChar(String character) {
		return character+character;
	}

	public String getCaseInsensitiveLike() {
		return "ILIKE";
	}

	public String getCharType() {
		return "character";
	}

	public String getTinyTextType() {
		return "varchar(255)";
	}
	
	public String getIntType(int max_size)
	{
		return "int";
	}
}
